/**
 * Created by zhuyufeng on 2015/12/29.
 */
var myApartment = new Ext.Panel({
	title:"我的宿舍",
	html: '<div id="m_home" class="container"></div>'
})
function loadmyApartment(){
	$.ajaxSetup({
		async: false
	});
	$.getJSON("./json/myApartment", function(data) {
		areadata = [];
		for(var i= 0,len=data.rows.length ;i<len;i++){
			$('#m_home').append('<br/><div class="row"><div class="col-lg-5">' +
				'<div class="panel panel-primary">' +
				'<div class="panel-heading">'+data.rows[i].names+'</div>' +
				'<div class="panel-body"><div class="row"><div class="col-lg-6">' +
				'<h4>学号:<b>'+data.rows[i].nums+'</b></h4>' +
				'<h4>专业：<b>'+data.rows[i].majors+'</b></h4>' +
				'<h4>班级：<b>'+data.rows[i].classs+'</b></h4></div>' +
				'</div></div></div></div>' +
				'<div class="col-lg-5 col-lg-offset-1">' +
				'<div class="panel panel-primary">' +
				'<div class="panel-heading">'+data.rows[i+1].names+'</div>' +
				'<div class="panel-body"><div class="row"><div class="col-lg-6">' +
				'<h4>学号:<b>'+data.rows[i+1].nums+'</b></h4>' +
				'<h4>专业：<b>'+data.rows[i+1].majors+'</b></h4>' +
				'<h4>班级：<b>'+data.rows[i+1].classs+'</b></h4></div>' +
				'</div></div></div></div></div>');
			i++;
		}
	})
}